<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let redApple = "红苹果";
      let greenApple = "绿苹果";

      // 交换变量值
      let temp = redApple;
      redApple = greenApple;
      greenApple = temp;

      console.log("交换后：");
      console.log("redApple:", redApple);
      console.log("greenApple:", greenApple);
    </script>
  </body>
</html>
